<?php

namespace common\enum;


class MasterLogEnum
{

    const ADMIN = 1;
    const MASTER = 2;
    const USER = 3;
    const AGENT = 4;

    //操作状态
    const STATUS_NAME = [
        1 => '成功',
        0 => '失败',
    ];
    const  DEVICE = [
        0 => '未获得设备信息',
        1 => 'PC端',
        2 => 'H5端',
    ];
    const AGENT_TYPE = [
        1 => '代理账号',
        0 => '股东账号',
    ];
    /***************停用/启用状态***************/
    const START_AND_STOP = [
        0 => '停用',
        1 => '启用',
    ];

    /***************日志详情分类***************/
    const NO_VIEW = 0;
    const SINGLE_VIEW = 1;
    const DOUBLE_VIEW = 2;

    const DOUBLE_VIEW_ARRAY = [
        self::ROLE_EDIT,
    ];


    /***************操作状态***************/
    const STATUS = [
        0 => '关闭',
        1 => '启用',
        2 => '冻结',
        3 => '维护',
    ];

    /***************日志状态***************/
    const SUCCESS = 1;
    const FAIL = 0;


    /***************操作id***************/
    const NOTICE_SEND = 1;//公告发送
    const NOTICE_WITHDRAW = 2;//公告撤回
    const GOOGLE_SWITCH = 3;//谷歌开关
    const HALL_DATA_EDIT = 4;//厅主资料编辑
    const HALL_STATUS_EDIT = 5;//厅主状态修改
    const HALL_MONTHLY_SETTING = 6;//厅主费用设置
    const MAINTAIN_EDIT_SWITCH = 7;//维护开关
    const MAINTAIN_EDIT_TIME = 8;//维护时间
    const GAME_SWITCH_EDIT = 9;//编辑游戏开关
    const GAME_MAINTAIN_TIME = 10;//设置维护游戏时间
    const GAME_IS_HOT = 11;//游戏API热门
    const GAME_SORT = 12;//游戏API排序
    const GAME_ADD = 13;//添加推荐游戏
    const GAME_START_AND_STOP = 14;//启/停推荐游戏
    const GAME_EDIT = 15;//编辑推荐游戏
    const GAME_DEL = 16;//删除推荐游戏
    const GAME_LABEL_EDIT = 17;//编辑游戏的属性
    const GAME_LABEL_ADD = 18;//游戏标签添加
    const GAME_LABEL_DEL = 19;//游戏标签删除
    const API_ACTIVITY_ADD = 20;//新增API活动
    const API_ACTIVITY_STATUS = 21;//启停API活动
    const API_ACTIVITY_EDIT = 22;//编辑API活动
    const API_ACTIVITY_DEL = 23;//删除API活动
    const ADMIN_ADD = 24;//新增管理员账号
    const ADMIN_START_AND_STOP = 25;//启停管理员账号
    const ADMIN_EDIT = 26;//编辑管理员账号
    const ADMIN_DEL = 27;//删除管理员账号
    const PAY_ADD = 28;//新增支付渠道
    const PAY_EDIT = 29;//编辑支付渠道
    const GAME_WARRANT = 30;//游戏授权
    const EDIT_PWD = 31;//修改管理员密码
    const GAME_LABEL_UPDATA = 32;//编辑
    const GAME_HALL_ADD = 33;//编辑
    const ROLE_ADD = 34;//新增角色
    const ROLE_EDIT = 35;//编辑角色
    const ROLE_DEL = 36;//删除角色
    const MEUN_ADD = 37;//新增一级导航
    const MEUN_PC_DEL = 38;//删除pc电子一级导航
    const MEUN_EDIT = 39;//编辑导航栏
    const ADMIN_LOGIN = 40;// 登录
    const ADMIN_LOGOUT = 41;// 登出

    //日志详情title
    const LOG_DETAIL_LIST = [
        self::API_ACTIVITY_EDIT => '编辑API活动',
        self::GAME_SORT         => '游戏API排序',
        self::ADMIN_EDIT        => '编辑管理员账号',
        self::GAME_WARRANT      => '编辑游戏授权',
        self::GAME_LABEL_UPDATA => '编辑游戏标签详情',
        self::GAME_EDIT         => '编辑推荐游戏详情',
        self::ROLE_EDIT         => '新增角色详情',
        self::ROLE_ADD          => '编辑角色详情',
        self::MEUN_EDIT         => '导航栏编辑内容',
    ];

    //old和new存入数据库的类型ARRAY
    const INFO_DATA_TYPE_ARRAY = [
        self::ROLE_ADD,
        self::ROLE_EDIT,
    ];
    //old和new存入数据库的类型obj
    const INFO_DATA_TYPE_OBJ = [
        self::NOTICE_SEND,
        self::NOTICE_WITHDRAW,
        self::GOOGLE_SWITCH,
        self::HALL_DATA_EDIT,
        self::HALL_STATUS_EDIT,
        self::HALL_MONTHLY_SETTING,
        self::MAINTAIN_EDIT_SWITCH,
        self::MAINTAIN_EDIT_TIME,
        self::GAME_SWITCH_EDIT,
        self::GAME_MAINTAIN_TIME,
        self::GAME_IS_HOT,
        self::GAME_SORT,
        self::GAME_ADD,
        self::GAME_START_AND_STOP,
        self::GAME_EDIT,
        self::GAME_DEL,
        self::GAME_LABEL_EDIT,
        self::GAME_LABEL_ADD,
        self::GAME_LABEL_DEL,
        self::API_ACTIVITY_ADD,
        self::API_ACTIVITY_STATUS,
        self::API_ACTIVITY_EDIT,
        self::API_ACTIVITY_DEL,
        self::ADMIN_ADD,
        self::ADMIN_START_AND_STOP,
        self::ADMIN_EDIT,
        self::ADMIN_DEL,
        self::PAY_ADD,
        self::PAY_EDIT,
        self::GAME_WARRANT,
        self::EDIT_PWD,
        self::GAME_LABEL_UPDATA,
        self::GAME_HALL_ADD,
        self::MEUN_EDIT,
    ];

    const TYPE_ONE = 1;//字符串输出类型
    const TYPE_TWO = 2;//新增无对比只有new数据
    const TYPE_THREE = 3;//为编辑有对比，有old数据和new数据
    const TYPE_FOUR = 4;//角色特定的type
    //详情数据的类型1为字符输出类型，2为新增无对比只有new数据,3为编辑有对比，有old数据和new数据
    const INFO_TYPE = [
        self::NOTICE_SEND          => self::TYPE_ONE,
        self::NOTICE_WITHDRAW      => self::TYPE_ONE,
        self::GOOGLE_SWITCH        => self::TYPE_ONE,
        self::HALL_DATA_EDIT       => self::TYPE_ONE,
        self::HALL_STATUS_EDIT     => self::TYPE_ONE,
        self::HALL_MONTHLY_SETTING => self::TYPE_ONE,
        self::MAINTAIN_EDIT_SWITCH => self::TYPE_ONE,
        self::MAINTAIN_EDIT_TIME   => self::TYPE_ONE,
        self::GAME_SWITCH_EDIT     => self::TYPE_ONE,
        self::GAME_MAINTAIN_TIME   => self::TYPE_ONE,
        self::GAME_IS_HOT          => self::TYPE_ONE,
        self::GAME_SORT            => self::TYPE_THREE,
        self::GAME_ADD             => self::TYPE_ONE,
        self::GAME_START_AND_STOP  => self::TYPE_ONE,
        self::GAME_EDIT            => self::TYPE_THREE,
        self::GAME_DEL             => self::TYPE_ONE,
        self::GAME_LABEL_EDIT      => self::TYPE_ONE,
        self::GAME_LABEL_ADD       => self::TYPE_ONE,
        self::GAME_LABEL_DEL       => self::TYPE_ONE,
        self::API_ACTIVITY_ADD     => self::TYPE_ONE,
        self::API_ACTIVITY_STATUS  => self::TYPE_ONE,
        self::API_ACTIVITY_EDIT    => self::TYPE_THREE,
        self::API_ACTIVITY_DEL     => self::TYPE_ONE,
        self::ADMIN_ADD            => self::TYPE_ONE,
        self::ADMIN_START_AND_STOP => self::TYPE_ONE,
        self::ADMIN_EDIT           => self::TYPE_THREE,
        self::ADMIN_DEL            => self::TYPE_ONE,
        self::PAY_ADD              => self::TYPE_ONE,
        self::PAY_EDIT             => self::TYPE_ONE,
        self::GAME_WARRANT         => self::TYPE_THREE,
        self::EDIT_PWD             => self::TYPE_ONE,
        self::GAME_LABEL_UPDATA    => self::TYPE_THREE,
        self::GAME_HALL_ADD        => self::TYPE_ONE,
        self::ROLE_ADD             => self::TYPE_FOUR,
        self::ROLE_EDIT            => self::TYPE_FOUR,
        self::ROLE_DEL             => self::TYPE_FOUR,
        self::MEUN_EDIT            => self::TYPE_THREE,
        self::ADMIN_LOGIN          => self::TYPE_ONE,
        self::ADMIN_LOGOUT         => self::TYPE_ONE,
    ];

    const REMARK = [
        'notice_send'               => '发送邮件--{:title}',
        'notice_withdraw'           => '撤回邮件--{:title}',
        'google_switch'             => '{:type}{:name}厅谷歌开关',
        'hall_data_edit'            => '编辑{:name}厅信息',
        'hall_game_switch'          => '编辑{:name}厅游戏授权',
        'hall_status_edit'          => '{:name}厅状态由{:old}改为{:new}',
        'hall_monthly_setting_keep' => '{:name}厅开启保底费{:amount}元',
        'hall_monthly_setting_line' => '{:name}厅开启线路费',
        'hall_add'                  => '新增厅主-厅主账号{:name}',
        'maintain_time_setting'     => '设置{:name}厅维护时间:{:star_time}-{:end_time}',
        'game_switch'               => '{:type}"{:game_type}-{:game_name}"游戏开关',
        'game_maintain_time'        => '设置"{:game_type}-{:game_name}"维护时间:{:star_time}-{:end_time}',
        'game_hot_switch'           => '{:type}"{:game_type}-{:game_name}"--"是否添加热门标识"开关',
        'game_hot_sort'             => '热门API设置--{:type}中的排序调整',
        'game_top_hot'              => '{:type}"热门{:game_type}-{:game_name}"--"是否显示"开关',
        'game_top_sort'             => '热门API设置--热门中的排序调整',
        'game_recommend_add'        => '添加"{:game_type}-{:game_name}-{:game}"',
        'game_recommend_switch'     => '{:type}"{:game_type}-{:game_name}-{:game}"',
        'game_recommend_edit'       => '编辑"{:game_type}-{:game_name}-{:game}"',
        'game_recommend_del'        => '删除"{:game_type}-{:game_name}-{:game}"',
        'game_tag_edit_time'        => '修改"{:game_type}-{:game_name}-{:game}"的{:type}结束时间,修改前时间为{:before_time},修改后结束时间{:after_time}',
        'game_tag_edit_switch'      => '{:type}"{:game_type}-{:game_name}-{:game}"的"是否添加热门标识"开关',
        'game_tag_edit'             => '编辑"{:game_type}-{:game_name}-{:game}"的标签',
        'game_tag_add'              => '添加一级标签：{:title}',
        'game_tag_add_sub'          => '在一级标签：{:title}添加二级标签{:sub_title}',
        'game_tag_del'              => '删除一级标签{:title}',
        'game_tag_del_sub'          => '在一级标签{:title}下删除二级标签:{:sub_title}',
        'api_activity_add'          => '新增API活动-{:name}',
        'api_activity_status'       => '{:type}API活动-{:name}',
        'api_activity_edit'         => '编辑API活动-{:name}',
        'api_activity_del'          => '删除API活动-{:name}',
        'admin_add'                 => '新增管理员账号-{:name}',
        'admin_start_and_stop'      => '{:type}管理员账号-{:name}',
        'admin_edit_pwd'            => '修改{:name}管理员密码',
        'admin_edit'                => '修改{:name}管理员账号信息',
        'admin_del'                 => '删除管理员账号--{:name}',
        'admin_login'               => '管理员{:name}登录',
        'admin_logout'              => '管理员{:name}登出',
        'role_add'                  => '新增角色-{:name},角色权限',
        'role_edit'                 => '编辑角色-{:name},角色权限',
        'role_del'                  => '删除角色-{:name},角色权限',
        'pay_add'                   => '新增支付渠道--{:name}支付',
        'pay_edit'                  => '编辑支付渠道--{:name}支付',
        'meun_add'                  => '新增{:type}一级导航栏--{:name}',
        'meun_del'                  => '删除{:type}一级导航栏--{:name}',
        'meun_edit'                 => '编辑{:type}内容',//  开关包含在编辑里面
    ];

    /*********编辑推荐游戏查看详情*********/
    const GAME_EDIT_ARRAY = [
        'start_time' => '开始时间',
        'end_time'   => '结束时间',
        'sort'       => '排序',
        'status'     => '状态',
    ];
    /*********编辑游戏标签时间*********/
    const GAME_LABEL_TYPE = [
        'hot' => '热门标签结束时间',
        'new' => '最新标签结束时间',
    ];

    /*********添加游戏标签级别*********/
    const GAME_LABEL_LEVEL = [
        'one' => '一级',
        'two' => '二级',
    ];

    /*********API活动修改*********/
    const API_ACTIV = [
        'name'       => '活动名称',
        'type'       => '活动类型',
        'link_pc'    => 'pc跳转链接',
        'link_h5'    => 'h5跳转链接',
        'begin_time' => '开始时间',
        'end_time'   => '结束时间',
        'status'     => '状态',
    ];
    /*********管理员账号修改*********/
    const ADMIN_EDIT_ARRAY = [
        'name'        => '姓名',
        'part'        => '部门',
        'job'         => '职位',
        'expire_time' => '有效期至',
        'role'        => '角色权限',
    ];

    /*********导航栏*********/
    const MUEN_TYPE = [
        'pc'       => 'PC端',
        'electron' => 'pc端电子导航栏',
        'h5'       => 'h5端',
    ];
    const MENU_ENABLED = '开启';
    const MENU_DISABLE = '关闭';
    /********导航栏PC端保存操作字段********/
    const MENU_TYPE_PC = [
        'is_display' => 'PC前端显示',
        'sort'       => '排序',
        'is_hot'     => 'PC显示HOT标识',
        'color'      => '字体颜色',
    ];
    /********导航栏H5/PC电子端字段********/
    const MENU_TYPE_H5 = [
        'is_display' => '前端是否显示',
        'sort'       => '排序',
    ];
    /********导航栏PC端编辑操作字段********/
    const MENU_PC_EDIT_ARRAY = [
        'name'        => '一级导航栏名称',
        'color'       => '字体颜色',
        'jump_switch' => '跳转开关',
        'game'        => '跳转游戏',
        'is_hot'      => '显示hot标识',
        'name_level'  => '二级级导航栏名称',
        'game_level'  => '跳转游戏',
        'game_title'  => '游戏大类名称',
        'api_name'    => '对应游戏/API',
        'selected'    => '已选',
    ];
}

